home *** CD-ROM | disk | FTP | other *** search
GW-BASIC | 1997-01-29 | 4.4 KB | 152 lines |
- 10 'TRUNORTH - True North Finder - 24 FEB 96 rev. 28 SEP 96
- 20 'Ref. ARRL ANTENNA BOOK, 14th Edition, page 16-2
- 30 IF EX$=""THEN EX$="EXIT"
- 40 PROG$="trunorth"
- 50 COMMON EX$,PROG$
- 60 CLS:KEY OFF
- 70 COLOR 7,0,1
- 80 DIM M$(12) 'month names
- 90 DIM C(36,3) 'wobble factors
- 100 U$="#####"
- 110 UL$=STRING$(80,205)
- 120 '
- 130 DATA Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec
- 140 FOR Z=1 TO 12:READ M$(Z):NEXT Z
- 150 '
- 160 '.....wobble correction factors
- 170 DATA 4,8,11, 13,14,14, 13,10,8, 4,1,-1, -3,-4,-4, -3,-1,1
- 180 DATA 4,5,6, 6,5,3, 1,-3,-7, -10,-13,-15, -16,-16,-14, -11,-7,-2
- 190 Y=-9
- 200 FOR Z=1 TO 36
- 210 M=Z/3:IF M=INT(M) THEN C(Z,1)=M ELSE C(Z,1)=INT(M)+1
- 220 Y=Y+10:C(Z,2)=Y
- 230 IF Y=21 THEN Y=-9
- 240 READ C(Z,3)
- 250 NEXT Z
- 260 '
- 270 '.....start
- 280 CLS
- 290 COLOR 15,2
- 300 PRINT " TRUE NORTH via the Sun";TAB(57)"by George Murphy VE3ERP ";
- 310 COLOR 1,0:PRINT STRING$(80,223);
- 320 COLOR 7,0
- 330 GOSUB 930 'preface
- 340 PRINT
- 350 COLOR 0,7
- 360 LOCATE ,22:PRINT " Press 1 to continue or 0 to quit...."
- 370 COLOR 7,0
- 380 Z$=INKEY$:IF Z$=""THEN 380
- 390 IF Z$="0"THEN CLS:RUN EX$
- 400 IF Z$="1"THEN 430
- 410 GOTO 380
- 420 '
- 430 COLOR 0,7:LOCATE CSRLIN-1,2
- 440 PRINT " Do you want to convert degree/minute/second values to decimal ";
- 450 PRINT "degrees? (y/n) ";
- 460 COLOR 7,0
- 470 Z$=INKEY$:IF Z$=""THEN 470
- 480 IF Z$="y"THEN CLS:CHAIN "equiv"
- 490 IF Z$="n"THEN 520
- 500 GOTO 470
- 510 '
- 520 '.....inputs
- 530 VIEW PRINT 3 TO 24:CLS:VIEW PRINT:LOCATE 3
- 540 PRINT " ENTER: Your longitude in decimal degrees:"
- 550 PRINT " (MINUS value if West, PLUS value if East)....";:INPUT DEG
- 560 DEG=-DEG
- 570 LN=CSRLIN-2:VIEW PRINT LN TO 24:CLS:VIEW PRINT:LOCATE 3
- 580 IF SGN(DEG)=1 THEN L$="W"ELSE L$="E"
- 590 TIM=(-DEG-7.5)/15
- 600 IF TIM=INT(TIM)THEN UTC=TIM ELSE UTC=INT(TIM+1) 'UTC differential
- 610 TIM=DEG/15 'time in hours to centre of time zone
- 620 SN=TIM+12
- 630 T=INT(SN)*100+(SN-INT(SN))*60
- 640 T=INT(T+0.5):T$=RIGHT$(STR$(T),LEN(STR$(T))-1)
- 650 IF LEN (T$)<4 THEN T$="0"+T$:GOTO 650
- 660 PRINT TAB(9)"At longitude";USING "####.#";ABS(DEG);:PRINT "<UNK! {00F8}>";L$;
- 670 PRINT " SOLAR NOON times throughout the year are:"
- 680 PRINT TAB(9)"(UTC = Universal Co-ordinated Time) (LST = Local SOLAR Time)"
- 690 PRINT UL$;
- 700 '
- 710 '.....display
- 720 FOR Z=1 TO 18
- 730 N=SN+C(Z,3)/60:IF N>=1160 THEN N=N+40
- 740 IF N<0 THEN N=N+24
- 750 T=INT(N)*100+(N-INT(N))*60
- 760 T=INT(T+0.5):T$=RIGHT$(STR$(T),LEN(STR$(T))-1)
- 770 IF LEN (T$)<4 THEN T$="0"+T$:GOTO 770
- 780 LST=T+UTC*100:IF LST>=2400 THEN LST=T-1200
- 790 PRINT TAB(6)M$(C(Z,1));USING "###";C(Z,2);
- 800 PRINT " @ ";T$;" UTC (";LST;"LST )";
- 810 '
- 820 N=SN+C(Z+18,3)/60:IF N>=1160 THEN N=N+40
- 830 IF N<0 THEN N=N+24
- 840 T=INT(N)*100+(N-INT(N))*60
- 850 T=INT(T+0.5):T$=RIGHT$(STR$(T),LEN(STR$(T))-1)
- 860 IF LEN (T$)<4 THEN T$="0"+T$:GOTO 860
- 870 LST=T+UTC*100:IF LST>=2400 THEN LST=T-1200
- 880 PRINT TAB(47)M$(C(Z+18,1));USING "###";C(Z+18,2);
- 890 PRINT " @ ";T$;" UTC (";LST;"LST )"
- 900 NEXT Z
- 910 GOTO 1340
- 920 '
- 930 '.....preface
- 940 M=7
- 950 PRINT TAB(M);
- 960 PRINT " The shadow of a vertically plumb stake cast by the sun at High"
- 970 PRINT TAB(M);
- 980 PRINT "Noon runs exactly north and south. This ancient axiom can be used to"
- 990 PRINT TAB(M);
- 1000 PRINT "aim your antenna, orient a sundial, or calibrate your car compass."
- 1010 PRINT TAB(M);
- 1020 PRINT " If the stake is north of lat. 23.5<UNK! {00F8}>N the shadow points north, if"
- 1030 PRINT TAB(M);
- 1040 PRINT "south of lat. 23.5<UNK! {00F8}>S, it points south. If the stake is between"
- 1050 PRINT TAB(M);
- 1060 PRINT "these latitudes and above the Equator the shadow points north in"
- 1070 PRINT TAB(M);
- 1080 PRINT "the winter and south in the summer. If south of the Equator it"
- 1090 PRINT TAB(M);
- 1100 PRINT "points north in the summer and south in the winter."
- 1110 PRINT TAB(M);
- 1120 PRINT " To determine just when High Noon is, you must know your longitude."
- 1130 PRINT TAB(M);
- 1140 PRINT "This will tell you when High Noon is SUPPOSED to occur but doesn't,"
- 1150 PRINT TAB(M);
- 1160 PRINT "due to the somewhat erratic wobbling of the earth about its axis as"
- 1170 PRINT TAB(M);
- 1180 PRINT "it circles the sun. Ancient mathematicians didn't know much about"
- 1190 PRINT TAB(M);
- 1200 PRINT "the wobble but we do, so we have to take it into account, which the"
- 1210 PRINT TAB(M);
- 1220 PRINT "program does."
- 1230 PRINT TAB(M);
- 1240 PRINT " The program refers to High Noon as SOLAR NOON (it sounds more"
- 1250 PRINT TAB(M);
- 1260 PRINT "High Tech). Local SOLAR (geophysical) TIMES shown may not be the"
- 1270 PRINT TAB(M);
- 1280 PRINT "same as STANDARD (political) TIMES in some political jurisdictions."
- 1290 PRINT
- 1300 PRINT TAB(M);
- 1310 PRINT " Your longitude must be entered in decimal degrees."
- 1320 RETURN
- 1330 '
- 1340 '.....end
- 1350 GOSUB 1390
- 1360 GOTO 270
- 1370 END
- 1380 '
- 1390 'HARDCOPY
- 1400 GOSUB 1510:LOCATE 25,2:COLOR 14,6
- 1410 PRINT " Press 1 to print screen, 2 to print screen & ";
- 1420 PRINT "advance paper, or 3 to continue.";:COLOR 7,0
- 1430 Z$=INKEY$:IF Z$="3"THEN GOSUB 1510:RETURN
- 1440 IF Z$="1"OR Z$="2"THEN GOSUB 1510:GOTO 1460
- 1450 GOTO 1430
- 1460 FOR QX=1 TO 24:FOR QY=1 TO 80
- 1470 LPRINT CHR$(SCREEN(QX,QY));
- 1480 NEXT QY:NEXT QX
- 1490 IF Z$="2"THEN LPRINT CHR$(12)
- 1500 GOTO 1400
- 1510 LOCATE 25,1:PRINT STRING$(80,32);:RETURN
-